﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class CalculatorTourController
    {
        public int InsertCalculatorTour(CalculatorTourInfo info)
        {
            return SQL.InsertCalculatorTour(info.TourId, info.QuantityAdults, info.QuantityChild, info.QuantityBaby, info.BeginDate, info.EndDate, info.Seasion, info.StatusTour, info.CreateBy, info.CreateDate, info.UpdateBy, info.UpdateDate);
        }
        public void UpdateCalculatorTour(CalculatorTourInfo info)
        {
            SQL.UpdateCalculatorTour(info.TourId, info.QuantityAdults, info.QuantityChild, info.QuantityBaby, info.BeginDate, info.EndDate, info.Seasion, info.StatusTour, info.CreateBy, info.CreateDate, info.UpdateBy, info.UpdateDate,info.CTId);
        }
        public void DeleteCalculatorTour(CalculatorTourInfo info)
        {
            DeleteCalculatorTour(info.CTId);
        }
        public void DeleteCalculatorTour(int cTId)
        {
            SQL.DeleteCalculatorTour(cTId);
        }
        public CalculatorTourInfo GetCalculatorTour(int cTId)
        {
            return CBO.FillObject<CalculatorTourInfo>(SQL.GetCalculatorTour(cTId));
        }
        public List<CalculatorTourInfo> ListCalculatorTour()
        {
            return CBO.FillCollection<CalculatorTourInfo>(SQL.ListCalculatorTour());
        }
        public DataTable SelectCalculatorTour()
        {
            return CBO.ConvertToDataTable(ListCalculatorTour(), typeof(CalculatorTourInfo));
        }
    }
}
